package com.example.backend.service;

import com.example.backend.mapper.OrderMapper;
import com.example.backend.model.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {
    @Autowired
    OrderMapper mapper;

    public Order findOne(Integer id) {
        return mapper.findOne(id);
    }

    public List<Order> findMatch(Integer userid) {
        return mapper.findMatch(userid);
    }

    public int insertOne(Order order) {
        return mapper.insertOne(order);
    }

    public int deleteOne(Integer id) {
        return mapper.deleteOne(id);
    }

    public int updateOne(Order order) {
        return mapper.updateOne(order);
    }
}
